package com.go.ssh.point.service;

import com.go.ssh.commons.pagination.Page;
import com.go.ssh.commons.service.IBaseService;
import com.go.ssh.point.exception.NotCodeException;
import com.go.ssh.point.model.GoodsCodeModel;

public interface IGoodsCodeService extends
		IBaseService<GoodsCodeModel, Integer> {

	/** 根据页码和商品Id查询查询所有商品兑换码分页对象 */
	public Page<GoodsCodeModel> listAllByGoods(int pn, int goodsId);

	/** 新增指定商品的兑换码 */
	public void save(int goodsId, String[] codes);

	/** 购买指定商品兑换码 */
	GoodsCodeModel buy(String username, int goodsId) throws NotCodeException;

}
